    while(1)
    {
        let readlineSync = require('readline-sync');
        let inputs=readlineSync.question("input 4 different numbers you guess!\n");
        let answer = '1234';
        let sum_one=0;
        let sum_two=0;
        let temp_one=[];
        let temp_two=[];
        inputs=String(inputs);
        let collection1=inputs.split("");
        answer=String(answer);
        let collection2=answer.split("");
        for(let i=0;i<collection1.length;i++){
            if(collection1[i]==collection2[i])
                {sum_one+=1;}
            else
                {temp_one.push(collection1[i]);
                temp_two.push(collection2[i]);}
        }
        for(let i=0;i<temp_one.length;i++){
            for(let j=0;j<temp_two.length;j++){
                if(temp_one[i]==temp_two[j])
                sum_two+=1;
            }
        }
        let outputs=`${sum_one}A${sum_two}B`
        console.log(outputs);
        if(outputs=='4A0B')
            break;
        }
    console.log("you are right!")